az ml service
Note
This reference is part of the azure-cli-ml extension for the Azure CLI (version 2.0.28 or higher). The extension will automatically install the first time you run an az ml service command. Learn more about extensions.
Manage operationalized services.
Commands
Name | Description | Type | Status |
---|---|---|---|
az ml service delete |
Delete a service from the workspace. |
Extension | GA |
az ml service get-access-token |
Get a token to issue requests a service. |
Extension | GA |
az ml service get-keys |
Get keys to issue requests against a service. |
Extension | GA |
az ml service get-logs |
Get logs for a service. |
Extension | GA |
az ml service list |
List services in the workspace. |
Extension | GA |
az ml service regen-key |
Regenerate keys for a service. |
Extension | GA |
az ml service run |
Run a service in the workspace. |
Extension | GA |
az ml service show |
Show details for a service in the workspace. |
Extension | GA |
az ml service update |
Update a service in the workspace. |
Extension | GA |
az ml service delete
Delete a service from the workspace.
az ml service delete --name
[--path]
[--resource-group]
[--subscription-id]
[--workspace-name]
[-v]
Required Parameters
The service name to delete.
Optional Parameters
Path to a project folder. Default: current directory.
Resource group corresponding to the provided workspace.
Specifies the subscription Id.
Name of the workspace containing the service to delete.
Verbosity flag.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az ml service get-access-token
Get a token to issue requests a service.
az ml service get-access-token --name
[--path]
[--resource-group]
[--subscription-id]
[--workspace-name]
[-v]
Required Parameters
Service Name.
Optional Parameters
Path to a project folder. Default: current directory.
Resource group corresponding to the provided workspace.
Specifies the subscription Id.
Name of the workspace containing the service to show.
Verbosity flag.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az ml service get-keys
Get keys to issue requests against a service.
az ml service get-keys --name
[--path]
[--resource-group]
[--subscription-id]
[--workspace-name]
[-v]
Required Parameters
Service Name.
Optional Parameters
Path to a project folder. Default: current directory.
Resource group corresponding to the provided workspace.
Specifies the subscription Id.
Name of the workspace containing the service to show.
Verbosity flag.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az ml service get-logs
Get logs for a service.
az ml service get-logs --name
[--init]
[--num_lines]
[--path]
[--resource-group]
[--subscription-id]
[--workspace-name]
[-v]
Required Parameters
Service Name.
Optional Parameters
Get logs of init container instead of the scoring container.
Number of log lines to return from tail (default is 5000).
Path to a project folder. Default: current directory.
Resource group corresponding to the provided workspace.
Specifies the subscription Id.
Name of the workspace containing the service to show.
Verbosity flag.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az ml service list
List services in the workspace.
az ml service list [--compute-type]
[--image-digest]
[--model-id]
[--model-name]
[--path]
[--property]
[--resource-group]
[--subscription-id]
[--tag]
[--workspace-name]
[-v]
Optional Parameters
If provided, will only show services that have the specified compute type. (Options are 'ACI', 'AKS').
If provided, will only show services that have the specified image digest.
If provided, will only show services that have the specified model id.
If provided, will only show services that have the specified model name.
Path to a project folder. Default: current directory.
If provided, will filter based on the provided key/value (e.g. key, or key=value). Multiple properties can be specified with multiple --property options.
Resource group corresponding to the provided workspace.
Specifies the subscription Id.
If provided, will filter based on the provided key/value (e.g. key, or key=value). Multiple tags can be specified with multiple --tag options.
Name of the workspace containing the services to list.
Verbosity flag.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az ml service regen-key
Regenerate keys for a service.
az ml service regen-key --key
--name
[--path]
[--resource-group]
[--set-key]
[--subscription-id]
[--workspace-name]
[-v]
Required Parameters
Which key to regenerate, if regen is specified. Options: Primary, Secondary.
Service Name.
Optional Parameters
Path to a project folder. Default: current directory.
Resource group corresponding to the provided workspace.
Provide auth value for the specified key.
Specifies the subscription Id.
Name of the workspace containing the service to show.
Verbosity flag.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az ml service run
Run a service in the workspace.
az ml service run --name
[--input-data]
[--path]
[--resource-group]
[--subscription-id]
[--workspace-name]
[-v]
Required Parameters
The service name to score against.
Optional Parameters
The data to use for calling the web service.
Path to a project folder. Default: current directory.
Resource group corresponding to the provided workspace.
Specifies the subscription Id.
Name of the workspace containing the service to run.
Verbosity flag.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az ml service show
Show details for a service in the workspace.
az ml service show --name
[--path]
[--resource-group]
[--subscription-id]
[--workspace-name]
[-v]
Required Parameters
Name of the webservice to show.
Optional Parameters
Path to a project folder. Default: current directory.
Resource group corresponding to the provided workspace.
Specifies the subscription Id.
Name of the workspace containing the service to show.
Verbosity flag.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az ml service update
Update a service in the workspace.
az ml service update --name
[--add-property]
[--add-tag]
[--ae]
[--ai]
[--ar]
[--as]
[--at]
[--autoscale-max-replicas]
[--autoscale-min-replicas]
[--base-image]
[--base-image-registry]
[--cc]
[--ccl]
[--cf]
[--collect-model-data]
[--compute-target]
[--cuda-version]
[--dc]
[--description]
[--dn]
[--ds]
[--ed]
[--eg]
[--entry-script]
[--environment-name]
[--environment-version]
[--failure-threshold]
[--gb]
[--gbl]
[--gc]
[--ic]
[--id]
[--is-migration]
[--kp]
[--ks]
[--lo]
[--max-request-wait-time]
[--model]
[--model-metadata-file]
[--no-wait]
[--nr]
[--path]
[--period-seconds]
[--po]
[--remove-tag]
[--replica-max-concurrent-requests]
[--resource-group]
[--rt]
[--sc]
[--scoring-timeout-ms]
[--sd]
[--se]
[--sk]
[--sp]
[--st]
[--subscription-id]
[--timeout-seconds]
[--token-auth-enabled]
[--workspace-name]
[-v]
Required Parameters
The service name to update.
Optional Parameters
Key/value property to add (e.g. key=value ). Multiple properties can be specified with multiple --add-property options.
Key/value tag to add (e.g. key=value ). Multiple tags can be specified with multiple --add-tag options.
Whether or not to enable key auth for this Webservice. Defaults to False.
Whether or not to enable AppInsights for this Webservice. Defaults to False.
How often the autoscaler should attempt to scale this Webservice. Defaults to 1.
Whether or not to enable autoscaling for this Webservice. Defaults to True if num_replicas is None.
The target utilization (in percent out of 100) the autoscaler should attempt to maintain for this Webservice. Defaults to 70.
The maximum number of containers to use when autoscaling this Webservice. Defaults to 10.
The minimum number of containers to use when autoscaling this Webservice. Defaults to 1.
A custom image to be used as base image. If no base image is given then the base image will be used based off of given runtime parameter.
Image registry that contains the base image.
The number of cpu cores to allocate for this Webservice. Can be a decimal. Defaults to 0.1.
The max number of CPU cores this Webservice is allowed to use. Can be a decimal.
Path to local file containing a conda environment definition to use for the image.
Whether or not to enable model data collection for this Webservice. Defaults to False.
(Preview) Specifies the compute target with AzureML extension installed to host migrated Kubernetes online endpoint and deployment.
Version of CUDA to install for images that need GPU support. The GPU image must be used on Microsoft Azure Services such as Azure Container Instances, Azure Machine Learning Compute, Azure Virtual Machines, and Azure Kubernetes Service. Supported versions are 9.0, 9.1, and 10.0. If 'enable_gpu' is set, this defaults to '9.1'.
Path to a JSON file containing deployment metadata.
Description of the service.
The dns name for this Webservice.
Path to local file containing additional Docker steps to run when setting up image.
Directory for Azure Machine Learning Environment for deployment. It is the same directory path as provided in 'az ml environment scaffold' command.
Whether or not to enable GPU support in the image. The GPU image must be used on Microsoft Azure Services such as Azure Container Instances, Azure Machine Learning Compute, Azure Virtual Machines, and Azure Kubernetes Service. Defaults to False.
Path to local file that contains the code to run for service (relative path from source_directory if one is provided).
Name of Azure Machine Learning Environment for deployment.
Version of an existing Azure Machine Learning Environment for deployment.
When a Pod starts and the liveness probe fails, Kubernetes will try --failure-threshold times before giving up. Defaults to 3. Minimum value is 1.
The amount of memory (in GB) to allocate for this Webservice. Can be a decimal.
The max amount of memory (in GB) this Webservice is allowed to use. Can be a decimal.
The number of gpu cores to allocate for this Webservice. Default is 1.
Path to a JSON or YAML file containing inference configuration.
Number of seconds after the container has started before liveness probes are initiated. Defaults to 310.
(Preview) Whether or not to migrate AKS web service to Kubernetes online endpoint and deployment. Defaults to False.
A primary auth key to use for this Webservice.
A secondary auth key to use for this Webservice.
The Azure region to deploy this Webservice to. If not specified the Workspace location will be used. More details on available regions can be found here: https://azure.microsoft.com/en-us/global-infrastructure/services/?regions=all&products=container-instances.
The maximum amount of time a request will stay in the queue (in milliseconds) before returning a 503 error. Defaults to 500.
The ID of the model to be deployed. Multiple models can be specified with additional -m arguments. Models need to be registered first.
Path to a JSON file containing model registration metadata. Multiple models can be provided using multiple -f parameters.
Flag to not wait for asynchronous calls.
The number of containers to allocate for this Webservice. No default, if this parameter is not set then the autoscaler is enabled by default.
Path to a project folder. Default: current directory.
How often (in seconds) to perform the liveness probe. Default to 10 seconds. Minimum value is 1.
The local port on which to expose the service's HTTP endpoint.
Key of tag to remove. Multiple tags can be specified with multiple --remove-tag options.
The number of maximum concurrent requests per node to allow for this Webservice. Defaults to 1.
Resource group corresponding to the provided workspace.
Which runtime to use for image. Current supported runtimes are 'spark-py' and 'python'spark-py|python|python-slim.
The cname for if SSL is enabled. Only applicable when updating an ACI service.
A timeout to enforce for scoring calls to this Webservice. Defaults to 60000.
Path to folders that contain all files to create the image.
Whether or not to enable SSL for this Webservice. Defaults to False.
The key file needed if SSL is enabled.
The cert file needed if SSL is enabled.
Minimum consecutive successes for the liveness probe to be considered successful after having failed. Defaults to 1. Minimum value is 1.
Specifies the subscription Id.
Number of seconds after which the liveness probe times out. Defaults to 2 second. Minimum value is 1.
Whether or not to enable token auth for this Webservice. Only available for AKS web services. Defaults to False.
Name of the workspace containing the service to update.
Verbosity flag.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI